package controllers

import (
	"github.com/astaxie/beego"
	"luckapi/tests"
	"luckapi/mutils"
)

type TestController struct {
	beego.Controller
}

func (c *TestController) UrlMapping()  {
	c.Mapping("testsql", c.Config)
}

// Config ...
// @Title Config
// @Description config
// @Param	body  body 	models.User	true		"body for User content"
// @Success 201 {int} models.User
// @Failure 403 body is empty
// @router /testsql [post]
func (c *TestController) Config() {
	mutils.MLog(string(c.Ctx.Input.RequestBody))
	tests.TestSql()
	c.Data["json"] = map[string]interface{}{"code":0,"message":"测试"}
	c.ServeJSON()
}